Many devices utilize a power management unit (PMU) to govern power functions of digital platforms. Digital state machines are used in the power management integrated circuit (PMIC) to implement the power management functions. The state machines are defined during design of the PMU and hardcoded during implementation of the device. For example, a battery charger is hardcoded to accept power from a single well defined source. Other sources are rejected by the battery charger.